package com.abc.genericextends;

import java.util.List;

public class Demo {
	public static void main(String[] args) {
		User user = new User(1,"张三丰",233);
		BaseDao<User> dao = new BaseDao<User>();
		dao.add(user);
		
		UserDao dao2 = new UserDao();
		User user2 = dao2.find(user);
		System.out.println(user2);
		List<User> all = dao2.findAll();
		System.out.println(all);
		
		DeptDao dao3 = new DeptDao();
		Department dept = new Department(1,"财务部");
		dao3.add(dept);
		List<Department> all2 = dao3.findAll();
		System.out.println(all2);
		
		System.out.println("=========================");
		EmplDao<User> dao4 = new EmplDao<User>();
		Employee e = new Employee(1,"张三");
		dao4.find(e);
		User user3 = dao4.getUser("1");
		System.out.println(user3);
		
		dao4.eee(User.class);
	}
}
